package com.wlyuan.index.domain.index.repository;


import com.wlyuan.core.domain.valueobj.CombineId;
import com.wlyuan.index.domain.index.CombineIndex;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;

/**
 * @author yuanjie
 */
public interface CombineIndexRepository extends ElasticsearchRepository<CombineIndex, Long> {

    default CombineIndex ofId(CombineId combineId) {
        return this.findById(combineId.getId()).orElse(null);
    }
}
